<!DOCTYPE html>
<html>
<head>
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?d890b1f16fb364253e79c5bb20225c3a";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>


    

    

    
<!-- Baidu Tongji -->
<script>var _hmt = _hmt || []</script>
<script async src="//hm.baidu.com/hm.js?busuanzi_value_site_uv"></script>
<!-- End Baidu Tongji -->




    <meta charset="utf-8">
    <meta name="baidu-site-verification" content="FYMCShbUK8" />
    <meta name="baidu-site-verification" content="ZYRF7OxQRW" />
    <meta name="baidu-site-verification" content="cHSqtjI0PN" />
    <meta name="baidu-site-verification" content="cHSqtjI0PN" />
    <meta name="baidu-site-verification" content="cHSqtjI0PN" />
    
    
    <link rel="canonical" href="https://hhardyy.com/2018/06/10/Vue全家桶开发旅游app/">
    
    
    <title>Vue全家桶开发旅游app | 小方块 - hhardyy.com | 复杂的坑+归其原理+了解实现规则===解决？解决成功：加油解决成功;</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#958e93">
    
    
    <meta name="keywords" content="app">
    <meta name="description" content="vue全家桶做的一个web版旅游app">
<meta name="keywords" content="app">
<meta property="og:type" content="article">
<meta property="og:title" content="Vue全家桶开发旅游app">
<meta property="og:url" content="http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/index.html">
<meta property="og:site_name" content="小方块 - hhardyy.com">
<meta property="og:description" content="vue全家桶做的一个web版旅游app">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2020-01-13T15:25:53.625Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Vue全家桶开发旅游app">
<meta name="twitter:description" content="vue全家桶做的一个web版旅游app">
    
        <link rel="alternate" type="application/atom+xml" title="小方块 - hhardyy.com" href="/atom.xml">
    
    <link rel="shortcut icon" href="/hardyfavicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/paulGraham.jpg)">
      <div class="brand" style="background-color:#4154b2">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">BingZhenhuang</h5>
          <a href="mailto:huangbingzhen@hhardyy.com" title="huangbingzhen@hhardyy.com" class="mail">huangbingzhen@hhardyy.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                所有文章
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/HHardyy" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://juejin.im/user/59a26f926fb9a02487553b04"  >
                <i class="icon icon-lg icon-pencil"></i>
                掘金-圳
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://segmentfault.com/u/hhardyy"  >
                <i class="icon icon-lg icon-comments"></i>
                Segmentfault
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://codepen.io/HHardyy/" target="_blank" >
                <i class="icon icon-lg icon-codepen"></i>
                Codepen
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/ZhenSolive/find.html" target="_blank" >
                <i class="icon icon-lg icon-globe"></i>
                原生直播间
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/hero/judge.html" target="_blank" >
                <i class="icon icon-lg icon-cloud"></i>
                原生小悟空
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/airPlay/HHardyy_PC.html" target="_blank" >
                <i class="icon icon-lg icon-camera"></i>
                原生飞机大战（PC）
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://www.freecodecamp.cn/hhardyy" target="_blank" >
                <i class="icon icon-lg icon-leaf"></i>
                Freecodecamp
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/友情链接"  >
                <i class="icon icon-lg icon-link"></i>
                友链
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">Vue全家桶开发旅游app</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">Vue全家桶开发旅游app</h1>
        <h5 class="subtitle">
            
                <time datetime="2018-06-09T18:26:24.000Z" itemprop="datePublished" class="page-time">
  2018-06-10
</time>


            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#css辅助工具依赖包stylus"><span class="post-toc-number">1.</span> <span class="post-toc-text">css辅助工具依赖包stylus</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#首页轮播-第三方插件vue-awesome-swiper-2-6-7稳定版"><span class="post-toc-number">2.</span> <span class="post-toc-text">首页轮播=第三方插件vue-awesome-swiper,2.6.7稳定版</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#axios"><span class="post-toc-number">3.</span> <span class="post-toc-text">axios</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#Better-scroll滚屏"><span class="post-toc-number">4.</span> <span class="post-toc-text">Better-scroll滚屏</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#手指滑动事件"><span class="post-toc-number">5.</span> <span class="post-toc-text">手指滑动事件</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#解决的一些问题"><span class="post-toc-number"></span> <span class="post-toc-text">解决的一些问题:</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#pagination分页"><span class="post-toc-number">1.</span> <span class="post-toc-text">pagination分页</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#对全局事件的解绑"><span class="post-toc-number">2.</span> <span class="post-toc-text">对全局事件的解绑</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#APP-vue对路由下的组件避免缓存"><span class="post-toc-number">3.</span> <span class="post-toc-text">APP.vue对路由下的组件避免缓存</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#移动端使用click会延迟300毫秒之后才执行"><span class="post-toc-number">4.</span> <span class="post-toc-text">移动端使用click会延迟300毫秒之后才执行</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#git-push之后的这个问题"><span class="post-toc-number">5.</span> <span class="post-toc-text">git push之后的这个问题</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#阻止页面默认行为"><span class="post-toc-number">6.</span> <span class="post-toc-text">阻止页面默认行为</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#真机测试的时候有些浏览器默认不支持promise"><span class="post-toc-number">7.</span> <span class="post-toc-text">真机测试的时候有些浏览器默认不支持promise</span></a></li></ol>
        </nav>
    </aside>
    
<article id="post-Vue全家桶开发旅游app"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">Vue全家桶开发旅游app</h1>
        <div class="post-meta">
            <time class="post-time" title="2018-06-10 02:26:24" datetime="2018-06-09T18:26:24.000Z"  itemprop="datePublished">2018-06-10</time>

            


            

        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <p>vue全家桶做的一个web版旅游app</p>
<p><iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="86" src="//music.163.com/outchain/player?type=2&id=558261233&auto=0&height=66"></iframe><br><a id="more"></a></p>
<h3 id="css辅助工具依赖包stylus"><a href="#css辅助工具依赖包stylus" class="headerlink" title="css辅助工具依赖包stylus"></a>css辅助工具依赖包stylus</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">npm install stylus --save</div><div class="line">npm install stylus-loader --save</div></pre></td></tr></table></figure>
<h3 id="首页轮播-第三方插件vue-awesome-swiper-2-6-7稳定版"><a href="#首页轮播-第三方插件vue-awesome-swiper-2-6-7稳定版" class="headerlink" title="首页轮播=第三方插件vue-awesome-swiper,2.6.7稳定版"></a>首页轮播=第三方插件vue-awesome-swiper,2.6.7稳定版</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">npm install vue-awesome-swiper@<span class="number">2.6</span><span class="number">.7</span> --save</div></pre></td></tr></table></figure>
<h3 id="axios"><a href="#axios" class="headerlink" title="axios"></a>axios</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">npm install axios --save</div></pre></td></tr></table></figure>
<h3 id="Better-scroll滚屏"><a href="#Better-scroll滚屏" class="headerlink" title="Better-scroll滚屏"></a>Better-scroll滚屏</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">npm install better-scroll --save</div><div class="line"></div><div class="line"><span class="keyword">if</span>(<span class="keyword">this</span>.latter)&#123;</div><div class="line">    <span class="keyword">this</span>.scroll.scrollToElement()</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h3 id="手指滑动事件"><a href="#手指滑动事件" class="headerlink" title="手指滑动事件"></a>手指滑动事件</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div></pre></td><td class="code"><pre><div class="line">touchstart</div><div class="line">touchmove</div><div class="line">touchend</div><div class="line"></div><div class="line">函数节流，限制执行效率touchmove执行效率过高了</div><div class="line">ref=<span class="string">"xxx"</span></div><div class="line"><span class="keyword">import</span> bscroll <span class="keyword">from</span> <span class="string">'better-scroll'</span></div><div class="line">mounted()&#123;</div><div class="line">	<span class="keyword">this</span>.bscroll=<span class="keyword">new</span> bscroll(<span class="keyword">this</span>.$refs.xxx)</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h2 id="解决的一些问题"><a href="#解决的一些问题" class="headerlink" title="解决的一些问题:"></a>解决的一些问题:</h2><h3 id="pagination分页"><a href="#pagination分页" class="headerlink" title="pagination分页"></a>pagination分页</h3><p>移步swiper中文网<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">解决swiper加载之前，gallary组件先渲染导致banner的时候出现bug的问题</div><div class="line">搜observeParents以及observer意思是当父组件dom刷新的时候，swiper重新刷新一次</div><div class="line">observeParents:<span class="literal">true</span></div><div class="line">observer：<span class="literal">true</span></div></pre></td></tr></table></figure></p>
<h3 id="对全局事件的解绑"><a href="#对全局事件的解绑" class="headerlink" title="对全局事件的解绑"></a>对全局事件的解绑</h3><p>由于使用了keep-alive产生的生命周期钩子activated，绑定的事件处理函数是<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="built_in">window</span>.addEventListener(<span class="string">'scroll'</span>, <span class="keyword">this</span>.handelScroll)</div></pre></td></tr></table></figure></p>
<p>因为绑定的是window对象，这样不光本页滚动会触发该事件处理函数，回到主页也会触发该事件处理函数，所以是默默的写了一个影响引擎的错误。<br>全局解绑就是deactivated，在上面那个方法后面加上这个方法<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="built_in">window</span>.removeEventListener(<span class="string">'scroll'</span>, <span class="keyword">this</span>.handelScroll)</div></pre></td></tr></table></figure></p>
<p>它会在页面重新加载的时候重新加载事件处理函数</p>
<h3 id="APP-vue对路由下的组件避免缓存"><a href="#APP-vue对路由下的组件避免缓存" class="headerlink" title="APP.vue对路由下的组件避免缓存"></a>APP.vue对路由下的组件避免缓存</h3><p>可以加上exclude，对其中的某个组件进行避免缓存，这样其mounted方法就不会一直缓存在同一个状态，导致路由跳转的状态不变从而axios获取数据的时候key值不被改变<br><figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"app"</span>&gt;</span></div><div class="line">  	<span class="tag">&lt;<span class="name">keep-alive</span> <span class="attr">exclude</span>=<span class="string">"detail"</span>&gt;</span></div><div class="line">      <span class="tag">&lt;<span class="name">router-view</span>/&gt;</span></div><div class="line">	<span class="tag">&lt;/<span class="name">keep-alive</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div></pre></td></tr></table></figure></p>
<h3 id="移动端使用click会延迟300毫秒之后才执行"><a href="#移动端使用click会延迟300毫秒之后才执行" class="headerlink" title="移动端使用click会延迟300毫秒之后才执行"></a>移动端使用click会延迟300毫秒之后才执行</h3><p>解决：引入faserclick<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">npm install fastclick --save</div></pre></td></tr></table></figure></p>
<p>把这个包安装到项目依赖，因为线上线下都要用就–save保存到package.json<br>项目入口文件里<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">import</span> FastClick <span class="keyword">from</span> <span class="string">'fastclick'</span></div><div class="line">FastClick.attach(<span class="built_in">document</span>.body)</div></pre></td></tr></table></figure></p>
<h3 id="git-push之后的这个问题"><a href="#git-push之后的这个问题" class="headerlink" title="git push之后的这个问题"></a>git push之后的这个问题</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">....... ....  hhardyy/Travel (master|MERGING)</div></pre></td></tr></table></figure>
<p>原因是可能同时上传了更新的文件导致冲突，这时候可以查看一下工作目录里面“README.md”文件的内容：<br><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">&lt;&lt;<span class="xml"><span class="tag">&lt;&lt;&lt;&lt;&lt; <span class="attr">HEAD</span>  </span></span></div><div class="line"><span class="xml">这是第二个人提交的......................  </span></div><div class="line"><span class="xml">=======  </span></div><div class="line"><span class="xml">这是第一个人提交的  </span></div><div class="line"><span class="xml">&gt;&gt;&gt;&gt;&gt;&gt;&gt; origin/master</span></div></pre></td></tr></table></figure></p>
<p>这时候git status查看哪个文件有报错，去到那个文件里面把多余的类似于&gt;&gt;&gt; head的代码干掉，重新add .然后提交就ok了</p>
<h3 id="阻止页面默认行为"><a href="#阻止页面默认行为" class="headerlink" title="阻止页面默认行为"></a>阻止页面默认行为</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">修复bug：在城市选择选择页从字母上滚动的时候屏幕默认会跟着上下移动，需要的效果是手指从字母上移动的时候根据移动到的字母左边显示出相应字母开头拼音的城市</div><div class="line">@touchstart.prevent=<span class="string">"handelTouchStart"</span></div><div class="line">.prevent=事件修饰符，可以阻止页面默认行为</div></pre></td></tr></table></figure>
<h3 id="真机测试的时候有些浏览器默认不支持promise"><a href="#真机测试的时候有些浏览器默认不支持promise" class="headerlink" title="真机测试的时候有些浏览器默认不支持promise"></a>真机测试的时候有些浏览器默认不支持promise</h3><figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">安装这个依赖</div><div class="line">npm install babel-polyfill --save</div></pre></td></tr></table></figure>
<p>它会判断浏览器如果没有promise，会自动增加这个es6的新特性<br>进入入口文件main.js里头import ‘babel-polyfill’在所有浏览器上就都支持promise了，以及解决部分白屏问题。<br><a href="https://github.com/HHardyy/Vue2.0-Travel-App" target="_blank" rel="external">项目地址</a></p>

        </div>

        <blockquote class="post-copyright">
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2020-01-13T15:25:53.625Z" itemprop="dateUpdated">2020-01-13 23:25:53</time>
</span><br>


        
        谢谢浏览，我会继续努力的，示例：<a href="/2018/06/10/Vue全家桶开发旅游app/" target="_blank" rel="external">http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/</a>
        
    </div>
    <footer>
        <a href="http://yoursite.com">
            <img src="/img/avatar.jpg" alt="BingZhenhuang">
            BingZhenhuang
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/app/">app</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/&title=《Vue全家桶开发旅游app》 — 小方块 - hhardyy.com&pic=http://yoursite.com/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/&title=《Vue全家桶开发旅游app》 — 小方块 - hhardyy.com&source=vue全家桶做的一个web版旅游app
" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《Vue全家桶开发旅游app》 — 小方块 - hhardyy.com&url=http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2018/06/10/Vue全家桶/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">Vue全家桶</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2018/05/19/vue组件通信/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">vue组件通信</h4>
      </a>
    </div>
  
</nav>



    














</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        🤠 请我喝可乐！
        <i class="icon icon-quote-right"></i>
    </h3>
    <div class="reward-content" style="width:50%">
        
        <div class="reward-code" style="text-align:center">
            <div style="width:300px;margin:0px auto;">
               <img id="rewardCode" style="width:50%;height:60%;display:block; margin:0px auto;" src="/img/alipay.jpg" alt="支付宝打赏二维码">
               <span style="display:inline-block; margin-bottom:20px;">0.88(支付宝 aliPay)</span>
               <img id="rewardCode" style="width:50%;height:60%;display:block; margin:0px auto;" src="/img/wechat.jpg" alt="微信打赏二维码">
               <span style="display:inline-block;">0.88(微信 weChat)</span>
            </div>
        </div>
    </div>
</div>



</div>

        <script>
!function(e,t,a){function n(){c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),o(),r()}function r(){for(var e=0;e<d.length;e++)d[e].alpha<=0?(t.body.removeChild(d[e].el),d.splice(e,1)):(d[e].y--,d[e].scale+=.004,d[e].alpha-=.013,d[e].el.style.cssText="left:"+d[e].x+"px;top:"+d[e].y+"px;opacity:"+d[e].alpha+";transform:scale("+d[e].scale+","+d[e].scale+") rotate(45deg);background:"+d[e].color+";z-index:99999");requestAnimationFrame(r)}function o(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),i(e)}}function i(e){var a=t.createElement("div");a.className="heart",d.push({el:a,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:s()}),t.body.appendChild(a)}function c(e){var a=t.createElement("style");a.type="text/css";try{a.appendChild(t.createTextNode(e))}catch(t){a.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(a)}function s(){return"rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"}var d=[];e.requestAnimationFrame=function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)}}(),n()}(window,document);
</script>
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script>
    function secondToDate(second) {
        if (!second) {
            return 0;
        }
        var time = new Array(0, 0, 0, 0, 0);
        if (second >= 365 * 24 * 3600) {
            time[0] = parseInt(second / (365 * 24 * 3600));
            second %= 365 * 24 * 3600;
        }
        if (second >= 24 * 3600) {
            time[1] = parseInt(second / (24 * 3600));
            second %= 24 * 3600;
        }
        if (second >= 3600) {
            time[2] = parseInt(second / 3600);
            second %= 3600;
        }
        if (second >= 60) {
            time[3] = parseInt(second / 60);
            second %= 60;
        }
        if (second > 0) {
            time[4] = second;
        }
        return time;
    }</script>
<script type="text/javascript" language="javascript">
    function setTime() {
        var create_time = Math.round(new Date(Date.UTC(2017, 08, 18, 11, 42, 23)).getTime() / 1000);
        var timestamp = Math.round((new Date().getTime() + 8 * 60 * 60 * 1000) / 1000);
        currentTime = secondToDate((timestamp - create_time));
        currentTimeHtml = 'Running：' + currentTime[0] + '年 ' + currentTime[1] + '天 '
                + currentTime[2] + '时 ' + currentTime[3] + '分 ' + currentTime[4]
                + '秒';
        document.getElementById("htmer_time").innerHTML = currentTimeHtml;
    }    setInterval(setTime, 1000);
</script>
<footer class="footer">
    <div class="top">
        

        <p>
          <span id="busuanzi_container_page_pv">
             [&nbsp;浏览量：&nbsp;<span id="busuanzi_value_page_pv"></span>&nbsp;]
          </span>
        </p>
    </div>
    <div class="bottom">
        <p>
        <span>BingZhenhuang &copy; 2017 - 2020</span>
            <span>
                
                Power by <a href="https://hhardyy.github.io/" target="_blank">zhen On August 8</a> 
            </span>
            <span id="htmer_time" "></span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/&title=《Vue全家桶开发旅游app》 — 小方块 - hhardyy.com&pic=http://yoursite.com/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/&title=《Vue全家桶开发旅游app》 — 小方块 - hhardyy.com&source=vue全家桶做的一个web版旅游app
" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《Vue全家桶开发旅游app》 — 小方块 - hhardyy.com&url=http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2018/06/10/Vue全家桶开发旅游app/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>








<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = '(•‾̑⌣‾̑•)✧˖°回来看我';
            clearTimeout(titleTime);
        } else {
            document.title = '(゜-゜)つロ欢迎回来';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
